<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMenusTable extends Migration
{

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('menus', function (Blueprint $table)
		{
			$table->increments('id');

			//菜单名称
			$table->string('name')->comment('菜单名称');

			//父级id
			$table->integer('pid')->comment('父级id');

			//路由别名
			$table->string('route')->comment('路由别名');

			//是否有效
			$table->enum('status', [
				'Yes',
				'No'
			])->default('No')->comment('是否有效');

			//排序
			$table->integer('sort')->comment('排序');

			$table->string('css')->default('icon-sitemap')->comment('样式');

			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('menus');
	}
}
